package org.bookie.model.services;

import java.util.List;

import org.bookie.model.Bet;
import org.bookie.model.Category;
import org.bookie.model.Event;
import org.bookie.model.Outcome;
import org.bookie.model.Period;
import org.bookie.model.services.impl.GenericDAO;

public interface BetDAO extends GenericDAO<Bet, Long> {
	/**
	 * Finalizes the bet
	 * @param outcome succesful outcome
	 */
	public void finalise(Outcome outcome);
	
	/**
	 * Returns a list of expired bets
	 * @return
	 */
	public List<Bet> findExpired();
	
	/**
	 * Returns a list of {@link Bet}s whose outcome is already known and stored. 
	 * These {@link Bet}s cannot be used for betting anymore.
	 * @return instance of List containing Bet
	 */
	public List<Bet> findFinalized(Period period, Category category);
	
	/**
	 * Returns a list of {@link Bet}s belonging to specified {@link Event} 
	 */
	public List<Bet> findByEvent(Event event);
}
